/*
 * Copyright 1999-2004 Alibaba.com All right reserved. This software is the confidential and proprietary information of
 * Alibaba.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only
 * in accordance with the terms of the license agreement you entered into with Alibaba.com.
 */
package com.liangdev.common.enums;

/**
 * 类UserAccountTypeEnum.java的实现描述：TODO 类实现描述
 * 
 * @author chongan.wangca 2012-3-16 下午2:51:37
 */
public enum UserAccountTypeEnum {

    USER_NICK("USER_NICK", "用户昵称"), USER_ID("USER_ID", "用户数字ID"), USER_EMAIL("USER_EMAIL", "用户邮箱");

    private String key;
    private String name;

    private UserAccountTypeEnum(String key, String name){
        this.key = key;
        this.name = name;
    }

    static public String getName(String key) {
        for (UserAccountTypeEnum obj : UserAccountTypeEnum.values()) {
            if (obj.getKey().equals(key)) {
                return obj.getName();
            }
        }
        return null;
    }

    public String getKey() {
        return key;
    }

    public String getName() {
        return name;
    }
}
